<?php

class ModelModel extends Model{

	protected $tableName = 'model'; 

    public function gettable($id){
       $name = $this->where('mid ='.$id)->getField('table');
       if($name){
            return $name; 
       }else{
            return 0;
       }
    }

    public function modelname(){
       $list = $this->select();
       $data[0] = '单页模型';
       foreach($list as $k => $v){
          $data[$v['mid']] = $v['title'];
       }
       return $data;
    }

}

?>